package com.td.filemanager.business.filethumbnail;

import com.td.filemanager.ResourceTable;
import com.td.filemanager.provider.ComponentViewHolder;
import com.td.filemanager.provider.ListComponentProvider;
import ohos.agp.components.Text;
import ohos.app.Context;

import java.util.List;

/**
 * 文件筛选提供
 */
public class FileThumbnailFilterProvider extends ListComponentProvider<String> {
    private static final String TAG = "FileThumbnailFilterProvider";

    /**
     * 实例化新的设备数据提供程序。
     *
     * @param context 上下文对象
     * @param listBean 文件数据
     * @param resourceId 资源id
     */
    public FileThumbnailFilterProvider(Context context, List<String> listBean, int resourceId) {
        super(context, listBean, resourceId);
    }

    @Override
    protected void onItemDataBind(ComponentViewHolder componentViewHolder, String item, int position) {
        Text fileTypeName = (Text) componentViewHolder.getChildComponent(ResourceTable.Id_fileTypeName);
        fileTypeName.setText(item);
    }
}
